/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tickets.ticketRegister;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import myutil.mymap.MyHashMap;
import myutil.mymap.MyMap;
import tickets.tickets.Ticket;

/**
 *
 * @author Hlib_Babii
 */
public class TicketRegisterImpl implements TicketRegister{
    private MyMap<Long, Ticket> emitedTickets = new MyHashMap<>();

    public TicketRegisterImpl() {
    }

    public Ticket getTicketById(long ticketId) {
        return (Ticket) emitedTickets.get(ticketId);
    }
    
    public void addTicket(Ticket ticket) {
        emitedTickets.put(ticket.getId(), ticket);
    }
}
